// $Id$
// Licensed under Apache License Version 2.0
// See: http://www.apache.org/licenses/LICENSE-2.0.html
package de.servicezombie.tcmdb.service;

import de.servicezombie.tcmdb.dao.mongo.MongoUtils;
import de.servicezombie.tcmdb.rest.vo.WsTestExecution;
import de.servicezombie.tcmdb.util.TestExecutionUtils;

public class CopyAllFieldsAndEmptyIdStrategy implements FieldCopyStrategy {

	@Override
	public void copy(WsTestExecution from, WsTestExecution into) {
		
		TestExecutionUtils.copyValuesFromDefinition(from, into);
		MongoUtils.invalidateId(into);
		
		into.setAffectedVersion(from.getAffectedVersion());
		into.setExecutionEffort(from.getExecutionEffort());
		into.setExecutionRemark(from.getExecutionRemark());
		into.setResolution(from.getResolution());
		into.setResponsible(from.getResponsible());
	}

}
